Belgelerim/ceng_491/implementation/doxygen/TraffEdu_Developers_Manual_Reference_ToSource/FileHandler.h

Go to the documentation of this file.
00001 /* 
00002 * FileHandler class of the system TraffEdu.
00003 * It handles the file save/load issues.
00004 */
00005 
00006 class FileHandler {
00007         CMainFrame* frame;
00008 public:
00012         FileHandler();
00019         bool saveFile(CArchive& ar);
00025         bool loadFile(CArchive& ar);
00026         
00027 private:
00033         void saveRoadMap(string sub);
00040         void loadRoadMap(string sub);
00041 
00042         int stringToInteger(_bstr_t str)
00043         {
00044                 BSTR bstr=str.GetBSTR();
00045                 
00046                 if(bstr == NULL)
00047         return -1;
00048                 CString strName(bstr); // in UNICODE mode
00049     
00050                 return _ttoi(strName);
00051 
00052         }
00053         double stringToDouble(_bstr_t str)
00054         {
00055                 BSTR bstr=str.GetBSTR();
00056                 
00057                 if(bstr == NULL)
00058         return -1;
00059                 CString strName(bstr); // in UNICODE mode
00060     
00061                 return atof(strName);
00062 
00063         }
00064 
00065 };

Generated on Sun May 28 18:54:09 2006 for TraffEdu by  doxygen 1.4.6-NO